export default {
  name: 'saleBags',
  data () {
    return {
      enclosureArr: [false, false, false, false, false, false, false],
			upLoadPics: [
				{ isExample: "0", url: "../static/img/sale/goods1.png"},
				{ isExample: "0", url: "../static/img/sale/goods1.png"},
				{ isExample: "0", url: "../static/img/sale/goods1.png"}
			]
    }
  },
  methods: {
		selectOne: function(i){
			var bool = !this.enclosureArr[i];
			this.enclosureArr[i] = !this.enclosureArr[i];
			this.$set(this.enclosureArr, i, bool);
		},
		deletePic: function(i){
			this.upLoadPics.splice(i, 1);
		},
		startEvaluation: function(){
			this.$http({
			  method: 'post',
			  url: 'http://173.16.102.175:8080/eval-web/eval/addOrder',
			  data: {
				  "order": "desc",
				  "page": 0,
				  "pagesize": 1,
				  "rows": [
				    {
				      "id": 1,
				      "biz_code": "2017090912333301",
				      "create_time": "2017-09-24 17:27:50",
				      "use_info": 1,
				      "brand_id": "LV",
				      "category_id": "01",
				      "purchase_date": "2016"
				    }
				  ],
				  "start": 0,
				  "total": 1,
				  "totalPages": 0
				}
			}).then(function(data){
				console.log(data);
			}, function(error){
				
			});
//			if(this.upLoadPics.length){
//				for(var i=0; i<this.upLoadPics.length; i++){
//					if(this.upLoadPics[i].isExample == "0"){
//						alert("您不能使用示例的照片！");
//						return;
//					}else{
//						alert();
//					}
//				}
//			}else{
//				alert("至少上传3张照片！");
//			}
		}
	},
	mounted: function(){
		window.document.title = "卖箱包";
	}
}